Basic Vim Commands

Core commands

To insert before the cursor: i

To insert after the cursor: a


To insert before the line: I

To append at the end of line: A


Copy a line: yy

Delete or cut a line: dd

Paste a line: pp

Create a new line: o


Undo: u

Redo: ctrl + r


Save file: ZZ

Not save file: ZQ

Move commands

Up: k

Down: j

Left: h

Right: l


Move forward by a word: w or e

Move backward by a word: b


To the end of a line: $

To the beginning of a line: ^


To the beginning of file: gg

To the end of file: G

Indentation

Indent current line: >>

Unindent current line: <<


Indent multi lines: >3 + space

Unindent multi lines: <3 + space

Selecting and Deletion command

VGx or Vggx